import java.util.ArrayList;
import java.util.Collection;
import java.util.Arrays;
import java.util.Iterator;

public class Test3 {
    public static void main(String[] args) {

        String[] strs = new String[]{"three", "two", "one", "four", "five", "six", "seven", "eight", "nine", "ten"};

        Collection coll = new ArrayList(Arrays.asList(strs));

        Iterator iterator = coll.iterator();

        while(iterator.hasNext()) {

            String str = (String)iterator.next();

            System.out.println(str);

            if (str.length() > 4) {
                iterator.remove();
            }
        }

        System.out.println(coll);

    }
}
